package com.cloud.bc.service;

import com.cloud.bc.model.domain.UserInfo;
import com.cloud.bc.model.entity.BcSingles;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cloud.bc.model.request.NearbyRequest;
import com.cloud.bc.model.request.SingleListRequest;
import com.cloud.bc.model.request.VideoListRequest;
import com.cloud.bc.model.request.VoiceListRequest;
import com.cloud.bc.model.response.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * 单身资料
 *
 * @author douhaichao code generator
 * @date 2021-01-03 19:29:40
 */
public interface BcSinglesService extends IService<BcSingles> {

    int count(BcSingles req);

    List<BcSingles> selectAll(BcSingles req);

    IPage<BcSingles> selectPage(Page page, BcSingles req);

    BcSingles selectOne(BcSingles req);

    boolean setSingles(String key, String value, Integer userId);

    List<BcSingles> getOfficialRecommendation();

    List<BcSingles> getTodayRecommendation(String ids);

    String respToDayRecommendationInfo(List<BcSingles> list);

    /**
     * 判断当前用户是否VIP，只有VIP才会显示相册，声音，视频
     */
    boolean isVip(UserInfo userInfo);

    void updateBrowse(Integer id);

    List<SingleSearchResponse> selectSingleSearch(Page page, SingleListRequest req,HttpServletRequest request);

    //声音
    List<VoiceListResponse> selectVoiceList(Page page, VoiceListRequest req);

    //视频
    List<VideoListResponse> selectVideoList(Page page, VideoListRequest req);

    List<MomenSingleResponse> selectMomenSingle(Set<Integer> userIds);

    Integer ageConvert(Date birthday);

    /**
     * 根据年龄计算日期
     * 当前日期减相应年龄年数
     * @param age 年龄
     * @return 年份
     */
    Integer birthdayConvert(Integer age);

    String districtConvert(String district);
    String districtConvert(String district,boolean fill);

    KarmaListResponse selectKarmaList(Integer page);

    List<MomenSingleResponse> nearby(Page page, NearbyRequest req);

    boolean pcModify(HttpServletRequest request, HttpServletResponse response, BcSingles req);

    boolean removeShow(BcSingles req);

    String getEidEncode(String toString);

    String getEidDecode(String toString);

    TeamCountResponse getTeamCount(Integer id);

    List<SingleSearchResponse> mayLike(UserInfo userInfo,HttpServletRequest request);
}
